<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Search_Controller extends CI_Controller {
	
	function __construct()
    {
		parent::__construct();
		$this->load->model('search_model');
    }
	
	function search(){
		$products = $this->search_model->get_product_by_search($_POST['search']);
		$this->html_meta['robots'] = 'nofollow,noindex';
		$this->template->write_view('header', 'header_detail_block', NULL, FALSE);
		$this->template->write_view('content', 'search_result_block', array('keyword' => $_POST['search'], 'block_title' => "Search Page ", 'products' => $products, 'show_add' => TRUE), /* 'pagination' => $this->pagination->create_links()), */ FALSE);
		$this->render_template = TRUE;
	}
}